package team.scau.laboratory_repair.modules.po;

import lombok.*;
import team.scau.laboratory_repair.common.base.BaseModel;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;

/**
 * @author 30254
 * creadtedate:2018/8/19
 */

@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "lab_perm")
public class Perm extends BaseModel {

    @Builder
    public Perm(Long id, Timestamp createTime, Timestamp updateTime, Timestamp deleteTime, Boolean valid, String url, String name, String perm, Long pid, String remark, Boolean show, String icon) {
        super(id, createTime, updateTime, deleteTime, valid);
        this.url = url;
        this.name = name;
        this.perm = perm;
        this.pid = pid;
        this.remark = remark;
        this.show = show;
        this.icon = icon;
    }

    @Column
    private String url;
    @Column
    private String name;
    @Column
    private String perm;
    @Column
    private Long pid;
    @Column
    private String remark;
    @Column(name = "[show]")
    private Boolean show;
    @Column
    private String icon;
    @Transient
    private List<Perm> subPerms;
}
